package com.cloud.pole.admin.model.entity;

import java.util.Date;
import javax.persistence.*;
import com.cloud.pole.admin.constant.AdminCommonConstant;

import lombok.Data;

@Table(name = "admin_menu")
@Data
public class Menu {
	/**
	 * 状态(0:无效 1:有效)
	 */
	public static final int ENABLED_YES = 1;
	public static final int ENABLED_NO  = 0;

    @Id
    @Column(name="menu_id")
    private Integer menuId;

    /**
     * 路径编码
     */
    @Column(name="code")
    private String code;

    /**
     * 标题
     */
    @Column(name="title")
    private String title;

    /**
     * 父级节点
     */
    @Column(name="parent_id")
    private Integer parentId = AdminCommonConstant.ROOT;

    /**
     * 重定向地址
     */
    @Column(name="href")
    private String href;

    /**
     * 图标
     */
    @Column(name="icon")
    private String icon;

    /**
     * 类型(menu:菜单 dirt:目录)
     */
    @Column(name="type")
    private String type;

    /**
     * 排序
     */
    @Column(name="order_num")
    private Integer orderNum;

    /**
     * 描述
     */
    @Column(name="description")
    private String description;

    /**
     * 备用字段（路径由code按层级拼接）
     */
    @Column(name="path")
    private String path;

    /**
     * 状态(0:无效 1:有效)
     */
    @Column(name="enabled")
    private Integer enabled;

    /**
     * vue组件
     */
    @Column(name="component")
    private String component;

    /**
     * VUE导航菜单
     */
    @Column(name="active_menu")
    private String activeMenu;


    /**
     * 状态(是否隐藏（0：否 1：是）)
     */
    @Column(name="hidden")
    private Integer hidden;

    @Column(name="crt_time")
    private Date crtTime;

    @Column(name="crt_user")
    private String crtUser;

    @Column(name="crt_name")
    private String crtName;

    @Column(name="crt_host")
    private String crtHost;

    @Column(name="upd_time")
    private Date updTime;

    @Column(name="upd_user")
    private String updUser;

    @Column(name="upd_name")
    private String updName;

    @Column(name="upd_host")
    private String updHost;

    @Column(name="attr1")
    private String attr1;

    @Column(name="attr2")
    private String attr2;

    @Column(name="attr3")
    private String attr3;

    @Column(name="attr4")
    private String attr4;

    @Column(name="attr5")
    private String attr5;

    @Column(name="attr6")
    private String attr6;
}